﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucMenu.ascx.cs" Inherits="SES.CMS.AdminCP.PageUC.ucMenu" %>
<%@ Register Assembly="DevExpress.Web.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dxpc" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v9.2, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dxe" %>
<script type="text/javascript">
    function SelectAndClosePopup(value) {
        txtGetLinkx.SetValue(value);
        pcParent.Hide();
    }
    function ClosePopup() {
        pcParent.Hide();
    }
</script>
<h2 class="h2-pro">
    <asp:Label runat="server" ID="lblAction"></asp:Label>
</h2>
<div>
    <table class="tablet">
        <tr>
            <td style="width: 200px;">
                Tiêu đề(*)
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtTitle" Width="350px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtTitle"
                    ValidationGroup="grpMenu" runat="server" ErrorMessage=" * " ForeColor="Red"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td>
                Đường dẫn
            </td>
            <td class="td-menu">
                <asp:TextBox runat="server" ID="txtLink" Width="450px" Visible="false"></asp:TextBox>
                <div style="float: left; width: 510px;">
                    <dxe:ASPxTextBox runat="server" ID="txtLinkMenu" Text="#" ClientInstanceName="txtGetLinkx" Width="500px" CssClass="text-menu-link">
                    </dxe:ASPxTextBox>
                    </div>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ControlToValidate="txtLinkMenu"
                        runat="server" ErrorMessage=" * " ValidationGroup="grpMenu" ForeColor="Red" style="float:left;"></asp:RequiredFieldValidator>
                
                <div style="float: left; width: 100px; margin-left: 5px;">
                    <dxe:ASPxButton ID="btnSelectParent" runat="server" Text="Chọn">
                        <ClientSideEvents Click="function(s, e) { pcParent.Show();}" />
                    </dxe:ASPxButton>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                Phân loại
            </td>
            <td>
                <asp:DropDownList runat="server" ID="ddlType" AppendDataBoundItems="true" CssClass="ddl-input">
                    <asp:ListItem Value="0" Text=".: Không chọn :."></asp:ListItem>
                    <asp:ListItem Value="1" Text="Menu con 1 cột"></asp:ListItem>
                    <asp:ListItem Value="2" Text="Menu con 2 cột"></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
         <tr>
            <td>
                Menu cha
            </td>
            <td>
                <asp:DropDownList runat="server" ID="ddlMenu" AppendDataBoundItems="true" CssClass="ddl-input">
                    <asp:ListItem Value="0" Text=".: Không chọn :."></asp:ListItem>
                   
                </asp:DropDownList>
            </td>
        </tr>
         <tr style="display:none;">
            <td>
                Vị trí
            </td>
            <td>
                <asp:DropDownList runat="server" ID="ddlModule" AppendDataBoundItems="true" CssClass="ddl-input">
                    <asp:ListItem Value="0" Text=".: Không chọn :."></asp:ListItem>
                    <asp:ListItem Value="1" Text="Trái trên"></asp:ListItem>
                    <asp:ListItem Value="2" Text="Phải trên"></asp:ListItem>
                    <asp:ListItem Value="3" Text="Trái dưới"></asp:ListItem>
                    <asp:ListItem Value="4" Text="Phải dưới"></asp:ListItem>
                   
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                Thứ tự
            </td>
            <td>
                <asp:TextBox runat="server" ID="txtOrder" Width="50px" Text="0"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" ControlToValidate="txtOrder"
                    runat="server" ErrorMessage=" * " ValidationGroup="grpMenu" ForeColor="Red"></asp:RequiredFieldValidator>
                <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="Chỉ nhập số"
                    ControlToValidate="txtOrder" Type="Integer" MinimumValue="0" MaximumValue="100"
                    ValidationGroup="grpMenu" ForeColor="Red"></asp:RangeValidator>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <asp:Button runat="server" ID="btnSubmit" CssClass="shiny-blue" Text="Lưu" ValidationGroup="grpMenu"
                    OnClick="btnSubmit_Click" />
                <asp:Button runat="server" ID="btnCancel" CssClass="shiny-blue" Text="Hủy" 
                    Enabled="false" onclick="btnCancel_Click" />
            </td>
        </tr>
    </table>
</div>
<dxpc:ASPxPopupControl ID="pcParent" runat="server" ClientInstanceName="pcParent"
    CloseAction="CloseButton" ContentUrl="~/AdminCP/Menu.aspx" HeaderText="Set Link menu"
    PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" CssClass="popup-box" Height="600px" Width="700px">
    <ContentCollection>
        <dxpc:PopupControlContentControl ID="PopupControlContentControl1" runat="server">
        </dxpc:PopupControlContentControl>
    </ContentCollection>
</dxpc:ASPxPopupControl>
